﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace demo9
{
    class mora
    {
        private string playerMora;
        private string nPCMora;
        private int Win = 0;
        private int Defeat = 0;
        private int a;
        private int b;

        public string PlayerMora { get => playerMora; set => playerMora = value; }
        public string NPCMora { get => nPCMora; set => nPCMora = value; }
        public int Win1 { get => Win; set => Win = value; }
        public int Defeat1 { get => Defeat; set => Defeat = value; }
        public int A { get => a; set => a = value; }
        public int B { get => b; set => b = value; }

        public void morap() 
        {
            Console.WriteLine("请出拳：1.石头 2.剪刀 3.布");
            int A = int.Parse(Console.ReadLine());

            switch (A)
            {
                case 1:
                    playerMora = "石头";
                    break;
                case 2:
                    playerMora = "剪刀";
                    break;
                case 3:
                    playerMora = "布";
                    break;
            }
        }

        public void moran() 
        {
            Random ra = new Random();
            B = ra.Next(1, 4);

            switch (B)
            {
                case 1:
                    playerMora = "石头";
                    break;
                case 2:
                    playerMora = "剪刀";
                    break;
                case 3:
                    playerMora = "布";
                    break;
            }
        }

        public void tend() 
        {
            if (A == B)
            {
                Console.WriteLine("和局?那就看下一把吧QWQ");
            }
            else if (A ==1 && B ==3 || A == 2 && B == 1 || A == 3 && B == 2 )
            {
                Console.WriteLine("可恶,被你赢了QWQ");
                Win1++;
            }
            else if (B == 1 && A == 3 || B == 2 && A == 1 || B == 3 && A == 2)
            {
                Console.WriteLine("输了QAQ");
                Defeat1++;
            }
        }
    }
}
